function validateForm() {
	
	// test whether XML files are uploaded or not, IGNORE THIS TEST if its UPDATE REQUETST
	if ((document.myform.uploaded_xml_files.value == null || document.myform.uploaded_xml_files.value == ""
			|| document.myform.uploaded_xml_files.value == 0) 
			&& document.myform.update_button_hidden.value == 0) {
		alert('Please upload mascot XML file/s');
		return false;
	}

	// test whether all star marked fields have values
	var inputs = document.myform.getElementsByTagName('input');
	for(var i=0; i<inputs.length; i++){
		var id = inputs[i].getAttribute('id');
				
		if (id && id.match(/.*?mandatory/) && (inputs[i].value == null || inputs[i].value == "")) {
			alert('Please enter values for all mandatory properties marked with *');
			return false;
		}
	}
	return true;
}				